package com.zhanghp.visitor;

import com.zhanghp.object.Accountant;
import com.zhanghp.object.Employee;
import lombok.extern.slf4j.Slf4j;

/**
 * 员工访问实现类
 *
 * @author zhanghp
 * @date 2022-08-16 15:12
 */
@Slf4j
public class ConfigureEmployeeVisitor implements PartCompanyVisitor {
    @Override
    public void visit(Employee employee) {
        log.info("Hello {}", employee);
    }

    @Override
    public void visit(Accountant accountant) {
        log.info("Hello {}", accountant);
    }

    @Override
    public String toString() {
        return " -->Employee<-- ";
    }

}
